package com.caishi.lkx.distribution.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caishi.lkx.distribution.service.IOrderService;
import com.caishi.lkx.order.mapper.OrderMapper;
import com.caishi.lkx.order.model.OrderModel;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("distributeOrderService")
public class OrderServiceImpl implements IOrderService {

    private final OrderMapper orderMapper;

    public OrderServiceImpl(OrderMapper orderMapper) {
        this.orderMapper = orderMapper;
    }

    @Override
    public Page<OrderModel> orderList(Page<OrderModel> page, Map<String, Object> params) {
        QueryWrapper<OrderModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.isNotNull("recommend_id")
                        .eq("deleted",false);


        return page.setRecords(orderMapper.selectList(queryWrapper));

    }
}
